<template>
<div class="content" @click="handleBannerColse">
  <div class="wrap">
    <swiper :options="swiperOption">
      <swiper-slide v-for="(item, index) in list" :key="index">
        <img class="swipe-img" :src="item">
      </swiper-slide>
      <div class="swiper-pagination"  slot="pagination"></div>
    </swiper>
  </div>
</div>
</template>

<script>
export default {
  data () {
    return {
      swiperOption: {
        pagination: '.swiper-pagination',
        paginationType: 'fraction',
        observeParents: true,
        observer: true
      }
    }
  },
  props: {
    list: Array
  },
  methods: {
    handleBannerColse () {
      this.$emit('changeShow')
    }
  }
}
</script>

<style lang="stylus" scoped>
.swiper-container
  overflow:inherit
.content
  position:fixed
  top:0
  left:0
  right:0
  bottom:0
  background:#000
  z-index:9
  /*垂直方向居中*/
  display:flex;
  flex-direction:column;
  justify-content:center;
  .wrap
    /*width:100%
    height:0
    padding-bottom:100%*/
    .swipe-img
      width:100%
    .swiper-pagination
      bottom:-2rem
      color:#fff
</style>
